<!DOCTYPE html>
<html>
<head>
    <title>查看--中软高科-2015</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    <script type="text/javascript" src="../Js/ckeditor/ckeditor.js"></script>
 

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
    <script type="text/javascript">
        let hosrId = window.location.href.split("?")[1].split("=")[1];

        $(function () {
            $('#backid').click(function(){
                    window.location.href="index.html";
             });
            init(hosrId);

            //根据hostId查询数据
            function init(hosrId) {
                $.ajax({
                    url: "findByHosrId",
                    data: {"hosrId": hosrId},
                    type: "post",
                    dataType: "json",
                    success: function (resp) {
                        if(resp.response.flag){
                            let hosregister = resp.data.hosregister;
                            var hosrId = $("#hosrId").text(hosregister.hosrId);
                            var hosrIdcar = $("#hosrIdcar").text(hosregister.hosrIdcar);
                            var hosrMedical = $("#hosrMedical").text(hosregister.hosrMedical);
                            var hosrRegprice = $("#hosrRegprice").text(hosregister.hosrRegprice);
                            var hosrPhone = $("#hosrPhone").text(hosregister.hosrPhone);
                            var hosrSelfprice = $("#hosrSelfprice").text(selfprice(hosregister.hosrSelfprice));
                            var hosrSex = $("#hosrSex").text(sexfo(hosregister.hosrSex));
                            var hosrAge = $("#hosrAge").text(hosregister.hosrAge);
                            var hosrWork = $("#hosrWork").text(hosregister.hosrWork);
                            var hosrLookdoctor = $("#hosrLookdoctor").text(lookdoctor(hosregister.hosrLookdoctor));
                            var hosrRemark = $("#hosrRemark").text(hosregister.hosrRemark);
                            var hosrName = $("#hosrName").text(hosregister.hosrName);
                            var dKeshi = $("#dKeshi").text(hosregister.doctor.dKeshi);
                            var dName = $("#dName").text(hosregister.doctor.dName);

                        }
                    }
                })
            }
    });
        function sexfo(sex){
            if (sex==1){
                return "女";
            }else {
                return "男";
            }
        }

        function selfprice(selfprice){
            if (selfprice==0){
                return "自费";
            }else {
                return "免费";
            }
        }

        function lookdoctor(lookdoctor){
            if (lookdoctor == 0){
                return "初诊";
            }else {
                return "复诊";
            }
        }



    </script>
</head>
<body>
<form action="../../index.html" method="post" class="definewidth m20">
<table class="table table-bordered table-hover definewidth m10">
    <tr>
        <td width="10%" class="tableleft">姓名</td>
        <td id="hosrName">陆小凤</td>
    </tr>

    <tr>
        <td width="10%" class="tableleft">身份证号</td>
        <td id="hosrIdcar">102434586345673</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">社保号</td>
        <td id="hosrMedical">435345435</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">挂号费</td>
        <td id="hosrRegprice">5元</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">联系电话</td>
        <td id="hosrPhone">12378656789</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">是否自费</td>
        <td id="hosrSelfprice">否</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">性别</td>
        <td id="hosrSex">男</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">年龄</td>
        <td id="hosrAge">33</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">职业</td>
        <td id="hosrWork">狗仔队</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">初复诊</td>
        <td id="hosrLookdoctor">初诊</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">所挂科室</td>
        <td id="dKeshi">骨科</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">指定医生</td>
        <td id="dName">欧阳雨露</td>
    </tr>
	<tr>
        <td width="10%" class="tableleft">备注</td>
        <td id="hosrRemark">此人疑拟有精神病</td>
	</tr>
    <tr>
        <td colspan="2">
			<center>
				<button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>
			</center>
		</td>
    </tr>
</table>
</form>
</body>
</html>